﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Common" targetNamespace="http://tempuri.org/Common.xsd" xmlns:mstns="http://tempuri.org/Common.xsd" xmlns="http://tempuri.org/Common.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Reports.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DilanOfficeConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DilanOfficeConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Reports.Properties.Settings.GlobalReference.Default.DilanOfficeConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="vwGoodsDetailedTableAdapter" GeneratorDataComponentClassName="vwGoodsDetailedTableAdapter" Name="vwGoodsDetailed" UserDataComponentName="vwGoodsDetailedTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.vwGoodsDetailed" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     Id, FullName
FROM         vwGoodsDetailed
ORDER BY FullName</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartsTableAdapter" GeneratorDataComponentClassName="DepartsTableAdapter" Name="Departs" UserDataComponentName="DepartsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     - 999999 AS Id, ' Все' AS Name
UNION ALL
SELECT     Id, Name
FROM         CO.Departments
ORDER BY Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentsTableAdapter" GeneratorDataComponentClassName="DepartmentsTableAdapter" Name="Departments" UserDataComponentName="DepartmentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DilanOfficeConnectionString (Settings)" DbObjectName="DilanOffice.CO.Departments" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     Id, Name
FROM         CO.Departments
ORDER BY Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Common" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Common" msprop:Generator_DataSetName="Common">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="vwGoodsDetailed" msprop:Generator_UserTableName="vwGoodsDetailed" msprop:Generator_RowDeletedName="vwGoodsDetailedRowDeleted" msprop:Generator_RowChangedName="vwGoodsDetailedRowChanged" msprop:Generator_RowClassName="vwGoodsDetailedRow" msprop:Generator_RowChangingName="vwGoodsDetailedRowChanging" msprop:Generator_RowEvArgName="vwGoodsDetailedRowChangeEvent" msprop:Generator_RowEvHandlerName="vwGoodsDetailedRowChangeEventHandler" msprop:Generator_TableClassName="vwGoodsDetailedDataTable" msprop:Generator_TableVarName="tablevwGoodsDetailed" msprop:Generator_RowDeletingName="vwGoodsDetailedRowDeleting" msprop:Generator_TablePropName="vwGoodsDetailed">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Departs" msprop:Generator_UserTableName="Departs" msprop:Generator_RowDeletedName="DepartsRowDeleted" msprop:Generator_RowChangedName="DepartsRowChanged" msprop:Generator_RowClassName="DepartsRow" msprop:Generator_RowChangingName="DepartsRowChanging" msprop:Generator_RowEvArgName="DepartsRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartsRowChangeEventHandler" msprop:Generator_TableClassName="DepartsDataTable" msprop:Generator_TableVarName="tableDeparts" msprop:Generator_RowDeletingName="DepartsRowDeleting" msprop:Generator_TablePropName="Departs">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Id" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Departments" msprop:Generator_UserTableName="Departments" msprop:Generator_RowDeletedName="DepartmentsRowDeleted" msprop:Generator_TableClassName="DepartmentsDataTable" msprop:Generator_RowChangedName="DepartmentsRowChanged" msprop:Generator_RowClassName="DepartmentsRow" msprop:Generator_RowChangingName="DepartmentsRowChanging" msprop:Generator_RowEvArgName="DepartmentsRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentsRowChangeEventHandler" msprop:Generator_TablePropName="Departments" msprop:Generator_TableVarName="tableDepartments" msprop:Generator_RowDeletingName="DepartmentsRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:vwGoodsDetailed" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Departments_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Departments" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>